package stage_1_module_2.code.homework_3;

/**
 * 上网套餐类 特征：上网流量、每月资费 行为：显示所有套餐信息 
 */
public class Net extends Abstractsheet implements Isnet {
    private int netAmount;
    private int consumeAmount;

    public void setnetAmount(int amount) {
        this.netAmount = amount;
    }
    public int getnetAmount() {
        return this.netAmount;
    }
    public void setconsumeAmount(int amount) {
        this.consumeAmount = amount;
    }
    public int getconsumeAmount() {
        return this.consumeAmount;
    }

    public void display() {
        System.out.printf("流量:%d，每月资费:%d", netAmount, consumeAmount);
    }

    public void servicenet(int amount, Net net) {
        System.out.println("上网测试"+amount);
        net.display();
    }
}
